package idiet.bean;

import java.io.Serializable;
import javax.persistence.*;
import java.sql.Timestamp;
import java.util.List;


/**
 * The persistent class for the food_material database table.
 * 
 */
@Entity
@Table(name="food_material")
public class FoodMaterial implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	private int id;

	private String alias;

	private String code;

	private String comment;

	@Column(name="lm_timestamp")
	private Timestamp lmTimestamp;

	private String name;
	@OneToOne
	@JoinColumn(name="resource_id")
	private Resource resource;

	//bi-directional many-to-one association to CustomerNurseMealRecipe
	@OneToMany(mappedBy="foodMaterial")
	private List<CustomerNurseMealRecipe> customerNurseMealRecipes;

	//bi-directional many-to-one association to FoodMaterialCategory
	@ManyToOne
	@JoinColumn(name="category_id")
	private FoodMaterialCategory foodMaterialCategory;

	//bi-directional many-to-one association to MealRecipe
	@OneToMany(mappedBy="foodMaterial")
	private List<MealRecipe> mealRecipes;
	
	@OneToMany(mappedBy="foodMaterial")
	private List<FoodIngredient> foodIngredients;
	
	public FoodMaterial() {
	}

	public int getId() {
		return this.id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getAlias() {
		return this.alias;
	}

	public void setAlias(String alias) {
		this.alias = alias;
	}

	public String getCode() {
		return this.code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getComment() {
		return this.comment;
	}

	public void setComment(String comment) {
		this.comment = comment;
	}

	public Timestamp getLmTimestamp() {
		return this.lmTimestamp;
	}

	public void setLmTimestamp(Timestamp lmTimestamp) {
		this.lmTimestamp = lmTimestamp;
	}

	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	public Resource getResource() {
		return resource;
	}

	public void setResource(Resource resource) {
		this.resource = resource;
	}
	
	public List<FoodIngredient> getFoodIngredients() {
		return foodIngredients;
	}

	public void setFoodIngredients(List<FoodIngredient> foodIngredients) {
		this.foodIngredients = foodIngredients;
	}

	public List<CustomerNurseMealRecipe> getCustomerNurseMealRecipes() {
		return this.customerNurseMealRecipes;
	}

	public void setCustomerNurseMealRecipes(List<CustomerNurseMealRecipe> customerNurseMealRecipes) {
		this.customerNurseMealRecipes = customerNurseMealRecipes;
	}

	public FoodMaterialCategory getFoodMaterialCategory() {
		return this.foodMaterialCategory;
	}

	public void setFoodMaterialCategory(FoodMaterialCategory foodMaterialCategory) {
		this.foodMaterialCategory = foodMaterialCategory;
	}

	public List<MealRecipe> getMealRecipes() {
		return this.mealRecipes;
	}

	public void setMealRecipes(List<MealRecipe> mealRecipes) {
		this.mealRecipes = mealRecipes;
	}

}